package com.iuie.ns.devtools.element;

import java.util.ArrayList;
import java.util.List;

public class BaseDevElement extends DevElement {
	
	private String prefix;
	
	private String suffix;
	
	private List<DevElement> children;
	
	public BaseDevElement(String prefix) {
		this.prefix = prefix;
	}
	
	public BaseDevElement(String prefix, String suffix) {
		this.prefix = prefix;
		this.suffix = suffix;
	}
	
	public BaseDevElement(List<DevElement> children) {
		this.children = children;
	}
	
	public BaseDevElement(String prefix, List<DevElement> children) {
		this(prefix, children, null);
	}
	
	public BaseDevElement(List<DevElement> children, String suffix) {
		this(null, children, suffix);
	}
	
	public BaseDevElement(DevElement item) {
		this(null, item, null);
	}
	
	public BaseDevElement(String prefix, List<DevElement> children, String suffix) {
		this.prefix = prefix;
		this.children = children;
		this.suffix = suffix;
	}
	
	public BaseDevElement(String prefix, DevElement item, String suffix) {
		this(prefix, suffix);
		if (item != null) {
			this.children = new ArrayList<>();
			this.children.add(item);
		}
	}
	@Override
	protected String getPrefix() {
		return this.prefix;
	}

	@Override
	protected String getSuffix() {
		return this.suffix;
	}

	@Override
	protected List<DevElement> getChildren() {
		return this.children;
	}
	
}
